// 文章相关的接口模块
import request from '@/utils/request'

// 获取文章分类接口
export const reqGetCateGory = () => request({
  method: 'get',
  url: '/my/cate/list'
})

// 新增分类
export const reqAddCate = obj => request({
  method: 'post',
  url: '/my/cate/add',
  data: obj
})

// 删除分类
export const reqDelCate = id => request({
  method: 'delete',
  url: '/my/cate/del',
  params: {
    id
  }
})

// 根据id查询文章分类数据
export const reqGetCateInfo = id => request({
  method: 'get',
  url: '/my/cate/info',
  params: { id }
})

// 更新分类
// post put patch 携带参数用data
// delete get  params
export const reqUpdateCate = (obj) => request({
  method: 'put',
  url: '/my/cate/info',
  data: obj
})
